<template>
    <div>商品总数量：{{ goodsTotal }}</div>
    <div>用户总数量：{{ userNum }}</div>
  </template>
  
  <script>
  import { goodsTotal, userNum } from "@/api/api";
  export default {
    data() {
      return {
        goodsTotal: 0,
        userNum: 0,
      };
    },
    created() {
      this.initPage();
    },
    methods: {
      async initPage() {
        const goodsData = await goodsTotal();
        this.goodsTotal = goodsData.data;
        const userName = await userNum();
        this.userNum = userName.data;
      },
    },
  };
  </script>
  
  <style></style>
  